#ifndef COUNTER_H
#define COUNTER_H

#include <QWidget>
#include <QPainter>
#include <QHash>
#include <QFile>
#include <QTextStream>

class Counter : public QWidget
{
	Q_OBJECT
public:
	Counter(const QString & f = "settings.dat", const int h = 50, const int w = 220);
public slots:
	void loadCnf(const QString &);
	void add(const int);
	void reset();
	void save();
protected:
//	void keyPressEvent(QKeyEvent *event);
	void paintEvent ( QPaintEvent * event );
private:
	QString filename;
	QString cur;
	QHash <QString, int> hash;
};
#endif
